<?php

class activity_upModel extends Model {
	public function addUp($uid, $dynamicId, $type) {
		if ($type == 1) {
			return $this->insert([
				'uid' => $uid,
				'activity_id' => $dynamicId,
				'add_time' => date('Y-m-d H:i:s'),
			]);
		} else {
			return $this->delete(['uid=?', 'activity_id=?'], [$uid, $dynamicId]);
		}

	}
}